<template>
	<view>
		
	<uni-card title="模组">
			<view class="box">
				<view class="box_t">
					<span class='mozu_t'>规格型号</span>
					<view class="vc">
						<uni-easyinput disabled=true type="number" v-model="wai.muozuguige" placeholder=""></uni-easyinput>
					</view>
				</view>
				<view class="box_t">
					<span class='mozu_t'>数量(张)</span>
					<view class="vc">
						<uni-easyinput @blur="shandleBlur"  v-model="bei.muzong" placeholder=""></uni-easyinput>
					
					</view>
	
				</view>
	
			</view>
			<view class="box">
	
				<view class="box_t">
					<span class='mozu_t'>单价
					</span>
					<view class="vc">
						<uni-easyinput disabled=true v-model="wai.mozudanjia" placeholder=""></uni-easyinput>
					</view>
	
				</view>
	
				<view class="box_t">
	              <span class='mozu_t'>金额
					</span>
					<view class="vc">
						<uni-easyinput disabled=true v-model="muzongjia" placeholder="模组的高度"></uni-easyinput>
	
					</view>
	
				</view>
			</view>
			
	
		</uni-card>
	<uni-card title="控制卡">
		<view class="box">
			<view class="box_t">
				<span class='mozu_t'>规格型号</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.hoangzhikaguige" placeholder=""></uni-easyinput>
				</view>
			</view>
			<view class="box_t">
				<span class='mozu_t'>数量(张)</span>
				<view class="vc">
					<uni-easyinput  @blur="shandleBlurl" v-model="bei.kongzhikazong" placeholder=""></uni-easyinput>
				
				</view>
	
			</view>
	
		</view>
		<view class="box">
	
			<view class="box_t">
				<span class='mozu_t'>单价
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.kongzhikadanjia" placeholder=""></uni-easyinput>
				</view>
	
			</view>
	
			<view class="box_t">
	          <span class='mozu_t'>金额
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="kongzhikazongjia" placeholder="模组的高度"></uni-easyinput>
	
				</view>
	
			</view>
		</view>
		
	
	</uni-card>
	
	<uni-card title="电源">
		<view class="box">
			<view class="box_t">
				<span class='mozu_t'>规格型号</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.dinyuanguioge" placeholder=""></uni-easyinput>
				</view>
			</view>
			<view class="box_t">
				<span class='mozu_t'>数量(台)</span>
				<view class="vc">
					<uni-easyinput  @blur="shandleBlurld" v-model="bei.dianyuanshu" placeholder=""></uni-easyinput>
				
				</view>
	
			</view>
	
		</view>
		<view class="box">
	
			<view class="box_t">
				<span class='mozu_t'>单价
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.dianyuandanjia" placeholder=""></uni-easyinput>
				</view>
	
			</view>
	
			<view class="box_t">
	          <span class='mozu_t'>金额
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="dianyuanshuzong" placeholder="模组的高度"></uni-easyinput>
	
				</view>
	
			</view>
		</view>
		
	
	</uni-card>
	<uni-card title="背条">
		<view class="box">
			<view class="box_t">
				<span class='mozu_t'>规格型号</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.neitiaoname" placeholder=""></uni-easyinput>
				</view>
			</view>
			<view class="box_t">
				<span class='mozu_t'>数量(根)</span>
				<view class="vc">
					<uni-easyinput @blur="shandleBlurldb"  v-model="bei.beitiaoshu" placeholder=""></uni-easyinput>
				
				</view>
	
			</view>
	
		</view>
		<view class="box">
	
			<view class="box_t">
				<span class='mozu_t'>单价
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.bietiaodan" placeholder=""></uni-easyinput>
				</view>
	
			</view>
	
			<view class="box_t">
	          <span class='mozu_t'>金额
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="beitiaoshujia" placeholder="模组的高度"></uni-easyinput>
	
				</view>
	
			</view>
		</view>
		
	
	</uni-card>
	<uni-card title="转角">
		<view class="box">
			<view class="box_t">
				<span class='mozu_t'>规格型号</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.zhuanjiaoguige" placeholder=""></uni-easyinput>
				</view>
			</view>
			<view class="box_t">
				<span class='mozu_t'>数量(个)</span>
				<view class="vc">
					<uni-easyinput @blur="shandleBlurldz"  v-model="bei.zhuanjiaozong" placeholder=""></uni-easyinput>
				
				</view>
	
			</view>
	
		</view>
		<view class="box">
	
			<view class="box_t">
				<span class='mozu_t'>单价
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.zhuanjiaodan" placeholder=""></uni-easyinput>
				</view>
	
			</view>
	
			<view class="box_t">
	          <span class='mozu_t'>金额
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="zhuanjiaozongjia" placeholder="模组的高度"></uni-easyinput>
	
				</view>
	
			</view>
		</view>
		
	
	</uni-card>
	<uni-card title="排线">
		<view class="box">
			<view class="box_t">
				<span class='mozu_t'>规格型号</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.paixianname" placeholder=""></uni-easyinput>
				</view>
			</view>
			<view class="box_t">
				<span class='mozu_t'>数量(根)</span>
				<view class="vc">
					<uni-easyinput @blur="shandleBlurldp"  v-model="bei.paixianshu" placeholder=""></uni-easyinput>
				
				</view>
	
			</view>
	
		</view>
		<view class="box">
	
			<view class="box_t">
				<span class='mozu_t'>单价
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.paixiandanjia" placeholder=""></uni-easyinput>
				</view>
	
			</view>
	
			<view class="box_t">
	          <span class='mozu_t'>金额
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="paixianshujia" placeholder="模组的高度"></uni-easyinput>
	
				</view>
	
			</view>
		</view>
		
	
	</uni-card>
	<uni-card title="网线">
		<view class="box">
			<view class="box_t">
				<span class='mozu_t'>规格型号</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.wangxianname" placeholder=""></uni-easyinput>
				</view>
			</view>
			<view class="box_t">
				<span class='mozu_t'>数量(根)</span>
				<view class="vc">
					<uni-easyinput @blur="shandleBlurldw"  v-model="bei.wangixanshu" placeholder=""></uni-easyinput>
				
				</view>
	
			</view>
	
		</view>
		<view class="box">
	
			<view class="box_t">
				<span class='mozu_t'>单价
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.wangxiandanjia" placeholder=""></uni-easyinput>
				</view>
	
			</view>
	
			<view class="box_t">
	          <span class='mozu_t'>金额
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wangixanshujia" placeholder="模组的高度"></uni-easyinput>
	
				</view>
	
			</view>
		</view>
		
	
	</uni-card>
	<uni-card title="黑红线">
		<view class="box">
			<view class="box_t">
				<span class='mozu_t'>规格型号</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.hiehongxianname" placeholder=""></uni-easyinput>
				</view>
			</view>
			<view class="box_t">
				<span class='mozu_t'>数量(根)</span>
				<view class="vc">
					<uni-easyinput @blur="shandleBlurldhf"  v-model="bei.heihongxianshu" placeholder=""></uni-easyinput>
				
				</view>
	
			</view>
	
		</view>
		<view class="box">
	
			<view class="box_t">
				<span class='mozu_t'>单价
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.hiehongdanjia" placeholder=""></uni-easyinput>
				</view>
	
			</view>
	
			<view class="box_t">
	          <span class='mozu_t'>金额
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="heihongxianshujia" placeholder="模组的高度"></uni-easyinput>
	
				</view>
	
			</view>
		</view>
		
	
	</uni-card>
	<uni-card title="三心线">
		<view class="box">
			<view class="box_t">
				<span class='mozu_t'>规格型号</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.sanxinxianname" placeholder=""></uni-easyinput>
				</view>
			</view>
			<view class="box_t">
				<span class='mozu_t'>数量(根)</span>
				<view class="vc">
					<uni-easyinput  @blur="shandleBlurldhsf"  v-model="bei.sanxinxianshu" placeholder=""></uni-easyinput>
				
				</view>
	
			</view>
	
		</view>
		<view class="box">
	
			<view class="box_t">
				<span class='mozu_t'>单价
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="wai.sanxinxiandanjia" placeholder=""></uni-easyinput>
				</view>
	
			</view>
	
			<view class="box_t">
	          <span class='mozu_t'>金额
				</span>
				<view class="vc">
					<uni-easyinput disabled=true v-model="sanxinxianshujia" placeholder="模组的高度"></uni-easyinput>
	
				</view>
	
			</view>
		</view>
		
	
	</uni-card>
		
		
		
		<uni-card title="备用金额(元)">
			<view class="box">
				<view class="box_t">
					
					<view class="vc">
						<uni-easyinput disabled=true v-model="zong" placeholder=""></uni-easyinput>
					</view>
				</view>
			
			</view>
			
		
		</uni-card>
		
		
		
		
		<view class="sdsds">
				
				</view>
		<button @click="goSearch" type="primary">外部预算</button>
		<view class="sds">
			
		</view>
		
	</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
				
				
				  
				
			
		
				 
			
				 
				
				 
			
				bei:{
					muzong:0,//模组数量
					muzongjia:0,//模组总价
				    kongzhikazong:0,//控制卡数量
					kongzhikazongjia:0,//控制卡总价
					dianyuanshu:0,//电源数量
					dianyuanshuzong:0,//电源总价
					beitiaoshu:0,//// 背条总数
					beitiaoshujia:0,//背条总价
					zhuanjiaozong:0,// 转角总数
					zhuanjiaozongjia:0,//转角总价
					paixianshu:0,	 // 排线总数
					paixianshujia:0,//排线总价
					wangixanshu:0,// 网线总数
					wangixanshujia:0,//网线总价
					heihongxianshu:0,// 黑红线总数
					heihongxianshujia:0,//黑红线总价
					sanxinxianshu:0,// 三心线总数
					sanxinxianshujia:0,//三心线总价
					zongjia:0,//总价
				}
			};
		},
		
		created() {
		
		},
		mounted() {
			// this.zhuan()
		},
		computed: {
			
		    wai () {
		      return this.$store.state.user.wai
		    },
			muzongjia(){
				return this.bei.muzong*this.wai.mozudanjia
			},
			kongzhikazongjia(){
				return this.bei.kongzhikazong*this.wai.kongzhikadanjia
			},
			dianyuanshuzong(){
				return this.bei.dianyuanshu*this.wai.dianyuandanjia
			},
			
			beitiaoshujia(){
				return this.bei.beitiaoshu*this.wai.bietiaodan
			},
			
			zhuanjiaozongjia(){
				return this.bei.zhuanjiaozong*this.wai.zhuanjiaodan
			},
			
			paixianshujia(){
				return this.bei.paixianshu*this.wai.paixiandanjia
			},
			wangixanshujia(){
				return this.bei.wangixanshu*this.wai.wangxiandanjia
			},
			heihongxianshujia(){
				return this.bei.heihongxianshu*this.wai.hiehongdanjia
			},
			sanxinxianshujia(){
				return this.bei.sanxinxianshu*this.wai.sanxinxiandanjia
			},
			zong(){
				return this.muzongjia+this.kongzhikazongjia+this.dianyuanshuzong+this.beitiaoshujia+
				this.zhuanjiaozongjia+this.paixianshujia+this.wangixanshujia+this.heihongxianshujia+
				this.sanxinxianshujia
			}
			
			
			
			
		  },
		  
		  methods:{
			  goSearch(){
				  this.bei.muzongjia=this.muzongjia
				   this.bei.kongzhikazongjia=this.kongzhikazongjia
				    this.bei.dianyuanshuzong=this.dianyuanshuzong
					this.bei.beitiaoshujia=this.beitiaoshujia
					this.bei.zhuanjiaozongjia=this.zhuanjiaozongjia
			       this.bei.paixianshujia=this.paixianshujia
				   this.bei.wangixanshujia=this.wangixanshujia
			       this.bei.heihongxianshujia=this.heihongxianshujia
				   this.bei.sanxinxianshujia=this.sanxinxianshujia
				   this.bei.zongjia=this.zong
			
			this.$store.commit('user/updateonebei',this.bei)
			
			uni.navigateTo({
				url:`/subpkg/waibu/waibu`
			});
			  },
			  
			  // 三心线
			  shandleBlurldhsf(e){
				  this.bei.sanxinxianshu=e.detail.value
				  
			  },
			  // 黑红线
			  shandleBlurldhf(e){
				  this.bei.heihongxianshu=e.detail.value
			  },
			  // 网线总数
			  shandleBlurldw(e){
				  
				   this.bei.wangixanshu=e.detail.value
			  },
			  // 排线总数
			  shandleBlurldp(e){
				   this.bei.paixianshu=e.detail.value
			  },
			  // 转角总数
			  shandleBlurldz(e){
				  this.bei.zhuanjiaozong=e.detail.value
			  },
			  // 背条总数
			  shandleBlurldb(e){
				  this.bei.beitiaoshu=e.detail.value
			  },
			  // 电源总数
			  shandleBlurld(e){
				  this.bei.dianyuanshu=e.detail.value
				  
			  },
			  // 控制卡总数
			  shandleBlurl(e){
				  
				  this.bei.kongzhikazong=e.detail.value
			  },
			  // 模组总数
			  shandleBlur(e){
				  this.bei.muzong=e.detail.value
			  },
			
			  // 数据转移
			  zhuan(){
				  this.bei={...this.wai}
			
			  }
		  }
	}
</script>

<style lang="scss">
.uni-easyinput__content-input{color: #000;}
.sdsds {
		height: 30px;
		margin-bottom: 20px;
	}
	.sds{height: 30px;
	}
	.uni-card__header-content-title{font-size: 18px !important;
	color: #029d94 !important;}
	
	
	button{background-color: #029d94 !important;}
</style>
